#include "APP_Mqtt.h"

static int cb(char* recv_buff,int len)
{
    log_info("消息数据内容为: %.*s\n",len,recv_buff);
    return 0;
}

int main(int argc, char const *argv[])
{
    //初始化mqtt客户端
    int ret = APP_MQTT_Init();
    if(ret != 0)
    {
        perror("客户端初始化出现异常 ");
        return -1;
    }
    //注册接收回调函数
    APP_MQTT_Register_Callback(cb);
    //发送消息
    APP_MQTT_Send("Su_da_to_donk",13);
    sleep(100000);
    return 0;
}

